//
//  WHSendCountHeaderView.m
//  SquirrelSeller
//
//  Created by 邓伟浩 on 2019/1/7.
//  Copyright © 2019 邓伟浩. All rights reserved.
//

#import "WHSendCountHeaderView.h"

@interface WHSendCountHeaderView ()

@property (nonatomic, strong) UILabel *timeLabel;
@property (nonatomic, strong) UILabel *successLabel;
@property (nonatomic, strong) UILabel *failureLabel;

@end

@implementation WHSendCountHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setMoneyDetailHeaderUI];
    }
    return self;
}

- (void)setMoneyDetailHeaderUI {
    [self addSubview:({
        _timeLabel = [[UILabel alloc] init];
        _timeLabel.textAlignment = NSTextAlignmentCenter;
        _timeLabel.adjustsFontSizeToFitWidth = YES;
        _timeLabel.textColor = CMDarkOrangeColor;
        _timeLabel.font = SYSTEMFONT(kRealwidth(15));
        _timeLabel.text = @"  时间  ";
        _timeLabel.backgroundColor = HexColor(@"ffeee5");
        
        ViewBorderRadius(_timeLabel, 0, 0.5, CLineColor);
        
        _timeLabel;
    })];
    [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.left.mas_equalTo(self);
        make.width.mas_equalTo(kRealwidth(125));
    }];
    
    [self addSubview:({
        _successLabel = [[UILabel alloc] init];
        _successLabel.textAlignment = NSTextAlignmentCenter;
        _successLabel.adjustsFontSizeToFitWidth = YES;
        _successLabel.textColor = CMDarkOrangeColor;
        _successLabel.font = SYSTEMFONT(kRealwidth(15));
        _successLabel.text = @"  成功(条)  ";
        _successLabel.backgroundColor = HexColor(@"ffeee5");
        
        ViewBorderRadius(_successLabel, 0, 0.5, CLineColor);
        
        _successLabel;
    })];
    [_successLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(self);
        make.left.mas_equalTo(_timeLabel.mas_right);
        make.width.mas_equalTo(kRealwidth(125));
    }];
    
    [self addSubview:({
        _failureLabel = [[UILabel alloc] init];
        _failureLabel.textAlignment = NSTextAlignmentCenter;
        _failureLabel.adjustsFontSizeToFitWidth = YES;
        _failureLabel.textColor = CMDarkOrangeColor;
        _failureLabel.font = SYSTEMFONT(kRealwidth(15));
        _failureLabel.backgroundColor = HexColor(@"ffeee5");
        _failureLabel.text = @" 失败(条) ";
        
        ViewBorderRadius(_failureLabel, 0, 0.5, CLineColor);
        
        _failureLabel;
    })];
    [_failureLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(self);
        make.left.mas_equalTo(_successLabel.mas_right);
        make.width.mas_equalTo(kRealwidth(125));
    }];
}

@end
